.class public final Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;
.super Ljava/lang/Object;
.source "DelayedCallbackExecutor.java"


# instance fields
.field private mCallback:Ljava/lang/Runnable;

.field private final mDelay:J

.field private final mHandler:Landroid/os/Handler;


# direct methods
.method public constructor <init>(J)V
    .locals 2
    .parameter "delay"

    .prologue
    .line 51
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 52
    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;->mHandler:Landroid/os/Handler;

    .line 53
    iput-wide p1, p0, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;->mDelay:J

    .line 54
    return-void
.end method


# virtual methods
.method public clear()V
    .locals 2

    .prologue
    .line 72
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;->mCallback:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    .line 73
    return-void
.end method

.method public execute(Ljava/lang/Runnable;)V
    .locals 4
    .parameter "runnable"

    .prologue
    .line 62
    if-eqz p1, :cond_0

    .line 63
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;->mCallback:Ljava/lang/Runnable;

    .line 64
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;->mCallback:Ljava/lang/Runnable;

    iget-wide v2, p0, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;->mDelay:J

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 66
    :cond_0
    return-void
.end method
